/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class PlantDetector {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010090033';
    }

    get categoryName() {
        return '\u690d\u7269\u68c0\u6d4b\u4eea';
    }

    getCurrentHumidity(params) {
        return command({
            method: 'getCurrentHumidity',
            methodId: 'pGox3y0C',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getCurrentTemperature(params) {
        return command({
            method: 'getCurrentTemperature',
            methodId: 'pZgubjhU',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getIlluminationStrength(params) {
        return command({
            method: 'getIlluminationStrength',
            methodId: 'pUPQDOFw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'ppAr4fHP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3eFRm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default PlantDetector;
